package com.neighbor.neighborhoodadmin.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 用户聊天消息表
 * </p>
 *
 * @author song
 * @since 2025-09-22 09:11:23
 */
@Getter
@Setter
@TableName("messages")
public class Messages {

    /**
     * 消息唯一ID
     */
    @TableId(value = "message_id", type = IdType.AUTO)
    private Integer messageId;

    /**
     * 发送者ID
     */
    @TableField("sender_id")
    private Integer senderId;

    /**
     * 接收者ID
     */
    @TableField("receiver_id")
    private Integer receiverId;

    /**
     * 消息内容
     */
    @TableField("content")
    private String content;

    /**
     * 消息类型(1:文本,2:图片,3:系统通知)
     */
    @TableField("msg_type")
    private Byte msgType;

    /**
     * 是否已读(0:未读,1:已读)
     */
    @TableField("is_read")
    private Byte isRead;

    /**
     * 创建时间
     */
    @TableField("created_at")
    private Date createdAt;
}
